package cn.yunhe.service.impl;

import java.util.Set;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.yunhe.dao.UserDao;
import cn.yunhe.entity.User;
import cn.yunhe.service.UserService;


@Service("userService")
public class UserServiceImpl implements UserService {
	
	@Autowired
	private UserDao userDao;
	

	public User loginUser(String username) {
		return userDao.loginUser(username);
	}

	public Set<String> getRolesByUsername(String username) {
		return userDao.getRolesByUsername(username);
	}

	public Set<String> getPermissionsByUsername(String username) {
		return userDao.getPermissionsByUsername(username);
	}

	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}

	

}
